![]() |
PBHMapNameAsync |
||||
Header: | Files.h | Carbon status: | Supported | |
Determines the user ID or group ID from a user or group name.
OSErr PBHMapNameAsync ( HParmBlkPtr paramBlock );
A pointer to an objParam variant of the HFS parameter block.
A result code.
The relevant fields of the parameter block are:
On input, a pointer to a completion function.
On output, the result code of the function.
On input, a pointer to a pathname.
On input, a volume specification.
On input, the mapping function code; its value is 3 if you’re mapping a user name to a user ID or 4 if you’re mapping a group name to a group ID.
On input, a pointer to the user/ group name. The name is passed as a string. If NULL is passed, the ID returned is always 0. The maximum size of the name is 31 characters.
On output, the mapped user/group ID.
Because user and group IDs are interchangeable under AFP 2.1 and later volumes, you might need to set the ioObjType field to determine which database (user or group) to search first. If both a user and a group have the same name, this field determines which kind of ID you receive.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)